<template>
    <div>
        <h2>结案事件</h2>
     <br/>
     <br/>
     <br/>
     <br/>
        <!--显示列表-->
        <el-table :data="tableData" class="table">
           
            <el-table-column prop="incidentDescription" label="事件描述" style="width: 250px;" />
            <el-table-column prop="eventType" label="事件类型" style="width: 250px;" />
            <el-table-column prop="eventSource" label="事件来源" style="width: 250px;" />
            <el-table-column prop="reportingTime" label="上报时间" style="width: 250px;">
                <template v-slot="spoce">
                    {{ spoce.row.reportingTime.substring(0,
                        10) }}&nbsp;
                </template>
            </el-table-column>
            <el-table-column prop="informant" label="上报人" style="width: 250px;" />
            <el-table-column prop="closedTime" label="结案时间" style="width: 250px;">
                <template v-slot="spoce">
                    {{ spoce.row.closedTime.substring(0,
                        10) }}&nbsp;
                </template>
            </el-table-column>
           
        </el-table>
    </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'


import axios from 'axios'
import { useRouter } from 'vue-router'
const router = useRouter()


const activeName = ref('first')

const tableData = ref([])
//显示列表
const fetchData = async () => {
    try {
        axios.get('http://47.95.178.186:8000/IncidentGetRout/api/FormManagementRead/ShowEvent', {
            params: {
                eventCategory: 2,
            }
        }).then(res => {
            tableData.value = res.data
        })
    } catch (error) {
        console.error(error)
    }
}
onMounted(() => {
    fetchData()
})

</script>

<style lang="scss" scoped></style>
